package com.g3d.types;

public class G3DVertex3 
{

	public G3DVertex3()
	{
		this.x = 0.0f;
		this.y = 0.0f;
		this.z = 0.0f;
		this.nX = 0.0f;
		this.nY = 0.0f;
		this.nZ = 0.0f;
		this.tU = 0.0f;
		this.tV = 0.0f;
		this.color = new G3DColor(1, 1, 1, 1);
	}
	
	public G3DVertex3(float x, float y, float z, float nX, float nY, float nZ, float tU, float tV, G3DColor color)
	{
		this.x = x;
		this.y = y;
		this.z = z;
		this.nX = nX;
		this.nY = nY;
		this.nZ = nZ;
		this.tU = tU;
		this.tV = tV;
		this.color = color.clone();
	}
	
	public G3DVertex3(G3DVector3 position, G3DVector3 normal, G3DVector2 tile, G3DColor color)
	{
		this.x = position.x;
		this.y = position.y;
		this.z = position.z;
		this.nX = normal.x;
		this.nY = normal.y;
		this.nZ = normal.z;
		this.tU = tile.x;
		this.tV = tile.y;
		this.color = color.clone();
	}
	
	public G3DVertex3 clone()
	{
		return new G3DVertex3(this.x, this.y, this.z, this.nX, this.nY, this.nZ, this.tU, this.tV, this.color.clone());
	}
	
	public G3DVector3 position()
	{
		return new G3DVector3(this.x, this.y, this.z);
	}
	
	public G3DVector3 normal()
	{
		return new G3DVector3(this.nX, this.nY, this.nZ);
	}
	
	public G3DVector2 tile()
	{
		return new G3DVector2(this.tU, this.tV);
	}
	
	public float x;
	public float y;
	public float z;
	public float nX;
	public float nY;
	public float nZ;
	public float tU;
	public float tV;
	public G3DColor color;
	
}
